<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@include file="/context/mytags.jsp" %>
<div class="table-scrollable">
    <table class="table table-striped table-hover table-success">
        <thead>
        <tr>
            <th>序号</th>
            <th>医院名称</th>
            <th>科室</th>
            <th>级别</th>
            <th>地区</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        <c:forEach items="${page.result}" var="hospitals" varStatus="vs">
            <tr>
                <td>${vs.count + page.offset}</td>
                <td>
                    <a href="javascript:;"
                       onclick="show('/hospitals/show?id=${hospitals.hospitalId}')">
                        ${hospitals.hospitalName}
                    </a>
                </td>
                <td>${hospitals.departmentNames}</td>
                <td>${hospitals.hospitalLevel}</td>
                <td>${hospitals.hospitalAddress}</td>
                <td>
                    <a href="javascript:;" class="btn btn-sm blue"
                       onclick="update('/hospitals/hospitals?id=${hospitals.hospitalId}')">
                        <i class="fa fa-edit"></i>编辑
                    </a>
                    <a href="javascript:;" class="btn btn-sm red" onclick="del('/hospitals/delete?id=${hospitals.hospitalId}')">
                        <i class="fa fa-trash"></i>删除
                    </a>

                    <a href="javascript:;" class="btn btn-sm red" onclick="addDepartment('/hospitals/hospitalsDepartment?id=${hospitals.hospitalId}')">
                        <i class="fa fa-plus"></i>新建科室
                    </a>
                </td>
            </tr>
        </c:forEach>
        </tbody>
    </table>
</div>
<div class="pageination-panel">${page}</div>